﻿using System;
using System.ComponentModel.Composition;

namespace NDBGen.Descriptors.Columns
{
    /// <summary>Represents metadata that is generated based on the presence of other pieces of metadata.</summary>
    [InheritedExport]
    public interface ITriggeredColumnMetadata : ITokenDescriptorMetadata
    {
        /// <summary>An array of <see cref="ITokenDescriptorMetadata" /> types that define the other types of metadata that must be present for this metadata to be triggered.</summary>
        Type[] RequiredMetadata { get; }

        /// <summary>Gets a <see cref="Boolean" /> value representing whether this metadata should be triggered based on the specified <see cref="DataType" />.</summary>
        /// <param name="dataType">A <see cref="DataType" /> value representing the data type of the column being processed.</param>
        /// <returns>A <see cref="Boolean" /> value representing whether this metadata should be triggered based on the specified <see cref="DataType" />.</returns>
        Boolean IsTriggered(DataType dataType);
    }
}